package com.imy.common.util;

import android.os.Build;
import android.util.Log;

import java.lang.reflect.Array;
import java.util.Arrays;

public class CPUUtils {
    public static final String X86="x86";
    public static final String ARM_64="arm64-v8a";
    public static final String ARM_V7A="armeabi-v7a";
    public static String[] getSupportCpu(){
        return Build.SUPPORTED_ABIS;
    }
    public static String getCpu(){
        String[] abis = new String[]{};
        abis = Build.SUPPORTED_ABIS;
        for ( String s:abis){
            if (s.equals("x86")){
                return X86;
            }
            if (s.equals("arm64-v8a")){
                return ARM_64;
            }
            if (s.equals("armeabi-v7a")){
                return ARM_V7A;
            }
        }
        return ARM_64;
    }
}
